{% extends 'front/front_base.html' %}
{% from 'common/static.html' import static %}

{% block title %}
六月论坛-发布您的新帖子
{% endblock %}
{% block head %}
    <link rel="stylesheet" href="{{ static('front/css/front_add_article.css') }}">
    <script src="http://media.junpy.club/wangEditor.min.js"></script>
    <script src="{{ static('front/js/front_add_article.js') }}"></script>
{% endblock %}
{% block content %}
    <form action="" method="post" id="add-form">
    <h2 class="h2 text-center">发布帖子</h2>
    <div class="form-group">
        <div class="input-group">
            <span class="input-group-addon">标题</span>
            <input type="text" class="form-control" placeholder="请输入帖子的标题" name="title">
        </div>
    </div>
    <div class="form-group">
        <div class="input-group">
            <span class="input-group-addon">板块</span>
            <select class="form-control" name="board_id">
                <option value="">--请选择板块--</option>
                {% for board in boards %}
                    <option value="{{ board.id }}">{{ board.board_name }}</option>
                {% endfor %}
            </select>
        </div>
    </div>
    <div class="form-group">
        <div class="form-group">
            <div id="editor"></div>
        </div>
    </div>
    <div class="form-group" id="captcha-group">
        <div class="input-group">
            <span class="input-group-addon">验证码</span>
            <input class="form-control" type="text" placeholder="请输入验证码" name="captcha" id="captcha">
            <span>
                <img src="{{ url_for('front.create_captcha') }}" alt="" id="img-captcha">
            </span>
        </div>
    </div>
    <div class="form-group">
        <button class="btn btn-primary" id="submit-btn">立即发布</button>
    </div>
    </form>
{% endblock %}